package com.macro.mall.tiny.security.util;

import com.macro.mall.tiny.modules.ums.model.UmsMember;

/**
 * @author Tyrone
 * @date 2024/10/15 00:22
 */
public class MemberContext {

    private static ThreadLocal<UmsMember> holder = new ThreadLocal<>();

    public static void setMember(UmsMember member) {
        holder.set(member);
    }

    public static UmsMember getMember() {
        return holder.get();
    }

    public static void clear() {
        holder.remove();
    }
}
